<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/9
 * Time: 10:23
 */

class DbTools
{
    public static $conn;
    public static function setConn($conn){
        self::$conn = $conn;
    }
    public static function select($sql){
        $result = self::$conn->query($sql);
        $data = [];
        while(true){
            $row = $result->fetch_assoc();
            if(empty($row)){
                break;
            }
            $data[] = $row ;
        }
        return $data;
    }
}